package org.hako.recite.word.util;

import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;

/**
 * Net utilities.
 * 
 * @author xnnyygn
 */
public class NetUtils {
   
    /**
     * Encode URL.
     * 
     * @param source
     */
    public static String encodeURL(String source){
        try {
            return URLEncoder.encode(source, "UTF-8");
        } catch (UnsupportedEncodingException e) {
            // will not happen.
            return source;
        }
    }
}
